const http = require('http');
const fs = require('fs');

let server = http.createServer((request, response) => {
	fs.readFile(`www${request.url}`, (err,data) => {
		if (err) {
			response.writeHead(404);
			response.write('Not Found');
		} else {
			response.write(data);
		}
		response.end();
	})
})

server.listen(8080);